#include<iostream>
using namespace std;

void test26()
{
	string str = "abcdefg";
	string subStr = str.substr(1, 3);
	cout << "substr = " << subStr << endl;

	string email = "hello@sina.com";
	int pos = email.find("@");
	string usename = email.substr(0,pos);
	cout << usename << endl;
}

int main26()
{
	test26();

	system("pause");
	return 0;
}